package com.meko.tms.data.config;


import com.meko.tms.core.access.AccessData;
import com.meko.tms.data.service.impl.tms.TmsDataSolutionServiceImpl;
import com.meko.tms.data.service.impl.tms.TmsIncrementalAdditionDataServiceImpl;
import com.meko.tms.data.service.impl.tms.TmsObtainDataServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AccessDataConfig {

    final TmsIncrementalAdditionDataServiceImpl tmsIncrementalAdditionDataService;

    public AccessDataConfig(TmsIncrementalAdditionDataServiceImpl tmsIncrementalAdditionDataService) {
        this.tmsIncrementalAdditionDataService = tmsIncrementalAdditionDataService;
    }

    @Bean
    public AccessData accessTmsData(){
        return new AccessData(new TmsObtainDataServiceImpl(),
                new TmsDataSolutionServiceImpl(),tmsIncrementalAdditionDataService);
    }

    @Bean
    public AccessData accessCmsData(){
        return new AccessData(new TmsObtainDataServiceImpl(),
                new TmsDataSolutionServiceImpl(),tmsIncrementalAdditionDataService);
    }

}
